package com.mbengue.corp.artisan.modele;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;

@Entity
@DiscriminatorValue("Facture")
@NamedNativeQueries(value = {
    @NamedNativeQuery(name = "toutesLesFactures", query = "select * from feuille where type='Facture'", resultClass = Facture.class),
    @NamedNativeQuery(name = "trouverFactureParDate", query = "select * from feuille where date >= ? and date < ? and type = 'Facture'", resultClass = Facture.class),
    @NamedNativeQuery(name = "trouverFactureParClient", query = "select * from feuille where client = ? and type = 'Facture'", resultClass = Facture.class),
    @NamedNativeQuery(name = "trouverFactureParArtisan", query = "select * from feuille where artisan = ? and type = 'Facture'", resultClass = Facture.class) })
public class Facture extends Feuille {
  private static final long serialVersionUID = -8598617664306329865L;

	public Facture() {
	}

  @Override
  public String toString() {
    return "Facture: " + super.toString();
  }
}
